package com.guigu.chenjiajun.controller;

import com.guigu.chenjiajun.service.InternalSchedulingService;
import com.guigu.chenjiajun.vo.MManufactureVo;
import com.guigu.chenjiajun.vo.MProcedureVo;
import com.guigu.chenjiajun.vo.ProceduringVo;
import com.guigu.common.pojo.MManufacture;
import com.guigu.common.pojo.MProcedureModule;
import com.guigu.common.vo.SearchVo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Controller
@RequestMapping("/InternalScheduling")
public class InternalSchedulingController {

    @Resource
    private InternalSchedulingService internalSchedulingService;

    @RequestMapping("/QueryRegister")
    @ResponseBody
    public SearchVo<MManufacture> QueryRegister(@RequestBody SearchVo searchVo){
        return this.internalSchedulingService.QueryRegister(searchVo);
    }

    @RequestMapping("/registerDispatching")
    @ResponseBody
    public MManufactureVo registerDispatching(String id){
        return this.internalSchedulingService.registerDispatching(id);
    }


    @RequestMapping("/checkInQueryProcedure")
    @ResponseBody
    public MProcedureVo checkInQueryProcedure(String id){
        return this.internalSchedulingService.checkInQueryProcedure(id);
    }


    @RequestMapping("/submitApplications")
    @ResponseBody
    public int submitApplications(@RequestBody ProceduringVo proceduringVo){
        return this.internalSchedulingService.submitApplications(proceduringVo);
    }

    @RequestMapping("/SubmitProcessHandover")
    @ResponseBody
    public int SubmitProcessHandover(String manufactureId,String id,String parentId,String number){

        return this.internalSchedulingService.SubmitProcessHandover(manufactureId,id,parentId,number);
    }

}
